Instantiates a Uno service with the ProcessServiceManager.
ProcessServiceManager で Uno サービスのインスタンスを作成します。
oService = CreateUnoService( Uno service name )
oService = CreateUnoService( Uno service name )
For a list of available services, go to: http://api.openoffice.org/docs/common/ref/com/sun/star/module-ix.html
利用できるサービスの一覧はここにあります: http://api.openoffice.org/docs/common/ref/com/sun/star/module-ix.html
oIntrospection = CreateUnoService( "com.sun.star.beans.Introspection" )
oIntrospection = CreateUnoService( "com.sun.star.beans.Introspection" )
The following code uses a service to open a file open dialog:
以下のプログラムでは「ファイルを開く」ダイアログを開くサービスを使っています:
Sub Main
Sub Main
fName = FileOpenDialog ("Please select a file")
fName = FileOpenDialog ("ファイルを選択してください")
print "file chosen: "+fName
print "選択したファイル名: "+fName
End Sub
End Sub
function FileOpenDialog(title as String) as String
function FileOpenDialog(title as String) as String
filepicker = createUnoService("com.sun.star.ui.dialogs.FilePicker")
filepicker = createUnoService("com.sun.star.ui.dialogs.FilePicker")
filepicker.Title = title
filepicker. Title = title
filepicker.execute()
filepicker.execute()
files = filepicker.getFiles()
files = filepicker.getFiles()
FileOpenDialog=files(0)
FileOpenDialog=files(0)
End function
End function